package store.algorithm.impl;

import store.Item;
import store.algorithm.AbstarctItemChangeValueAlgorithm;

/**
 * AgedWine
 * @author yuanchen
 * @date 2021-10-29 16:02
 */
public class AgedWineItemChangeValueAlgorithm extends AbstarctItemChangeValueAlgorithm{

    @Override
    public void changeCurrent(Item item) {
        item.sellIn=item.sellIn-SELL_IN_STEP;
        item.value=item.value+1;
        if(item.sellIn<0){
            item.value=item.value+1;
        }
    }
}